﻿using System;

namespace c2iGMailNotifier.Model
{
    public class AtomEntry : IEquatable<AtomEntry>
    {
        public string Title { get; set; }
        public string Summary { get; set; }
        public string Link { get; set; }
        public DateTime Modified { get; set; }
        public DateTime Issued { get; set; }
        public string AuthorName { get; set;}
        public string AuthorEMail { get; set; }
        public string Id { get; set; }

        public override int GetHashCode()
        {
            return Id.GetHashCode();
        }

        public override bool Equals(object other)
        {
            AtomEntry atomEntryObj = other as AtomEntry;
            return atomEntryObj == null ? false : this.Equals(atomEntryObj);
        }

        #region IEquatable<AtomEntry> Membres

        public bool Equals(AtomEntry other)
        {
            return this.Id.Equals(other.Id);
        }

        #endregion
    }
}